<?php get_instance()->view('common/header');?>
<style type="text/css">
    <!--
    .text-val {
        padding-top: 3px;
        padding-left: 0;
    }

    .text-label {
        color: grey;
        text-align: right;
    }

    .btn-group, .btn-group-vertical {
        display: inline-block;
        position: absolute;
        vertical-align: middle;
    }

    .sale-summary li:first-child {
        border-top: medium none;
    }

    .sale-summary li {
        border-top: 1px solid #eee;
        overflow: hidden;
        padding: 10px 0;
    }

    .sale-summary li .sale-info {
        color: #646464;
        float: left;
        font-size: 14px;
        text-transform: uppercase;
    }

    .sale-summary li .sale-num {
        color: #169ef4;
        float: right;
        font-size: 20px;
        font-weight: 300;
    }

    .description-box img {
        width: 100%;
    }
    -->
</style>
<style type="text/css">
    div .radio-inline:nth-child(2), div .checkbox-inline:nth-child(2) {
        margin-left: 10px;
    }
    div.form-body>.tab-pane{display: none}
    div.form-body>.tab-pane.active{display: block}

    .table-scrollable > .table > thead > tr > th, .table-scrollable > .table > tbody > tr > th, .table-scrollable > .table > tfoot > tr > th, .table-scrollable > .table > thead > tr > td, .table-scrollable > .table > tbody > tr > td, .table-scrollable > .table > tfoot > tr > td{
        word-break:break-all;
    }
    .edit-supervise{margin: 0 5px;}
    .supervise-add{margin-left: 15px;}
    .supervise-file{float: left}
    .sup-portrait>img{max-width: 100%;height: 100px;}
    .table-actions-wrapper{float: right}
</style>
<div class="page-container home">
    <?php get_instance()->view('common/sidebar');?>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                    <h3 class="page-title"><?php echo $title?></h3>
                    <ul class="page-breadcrumb breadcrumb">
                        <li class="btn-group"> <a class="btn default ml_5 return" href="<?php echo getUrl('merchant');?>"><i class="fa fa-chevron-left"></i> 返回</a> </li>
                        <li><i class="fa fa-home"></i><a href="<?php echo getUrl('course');?>"><?php echo $title?>  <i class="fa fa-angle-right"></i></a></li>
                        <li><a href="javascript:void(0);">详情</a></li>
                    </ul>
                    <!-- END PAGE TITLE & BREADCRUMB-->
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="row">
                        <div class="col-md-12 profile-info">
                            <div class="row">
                                <div class="col-md-12">
                                    <div style="border: 1px solid #ddd; padding: 10px; margin-bottom: 30px;">
                                        <div class="row">
                                            <div class="col-md-1">
                                                <ul class="list-unstyled profile-nav">
                                                    <li><img src="<?php echo $info['portrait'] ? $info['portrait'] : getDefaultPortrait(2)?>" class="img-responsive" alt=""></li>
                                                </ul>
                                            </div>
                                            <div class="col-md-11">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <?php if ($info['shop_name']):?>
                                                                <label class="col-md-4 control-label text-label">店铺名称：</label>
                                                                <div class="col-md-8 text-val nickname"><?php echo $info['shop_name'];?></div>
                                                            <?php else:?>
                                                                <label class="col-md-4 control-label text-label"> 昵称：</label>
                                                                <div class="col-md-8 text-val nickname"><?php echo $info['nickname'];?></div>
                                                            <?php endif;?>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">手机号码：</label>
                                                            <div class="col-md-8 text-val"><?php echo $info['mobile'];?></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">余额：</label>
                                                            <div class="col-md-8 text-val balance"><?php echo $info['balance'];?></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">状态：</label>
                                                            <div class="col-md-8 text-val"><?php echo $info['status']==1 ? '禁用' : '启用';?></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">等级：</label>
                                                            <div class="col-md-8 text-val">
                                                                <span class="rank"><?php echo $info['rank_name']?></span>
                                                                <?php if ($info['rank'] == 1 || $info['rank'] == 2):?>
                                                            &nbsp;<a href="<?php echo getUrl('merchant/upgrade?id='.$info['id']);?>" alert-message="是否确认升级？" class="ajax-request-btn"><i class="fa fa-long-arrow-up"></i> 升级</a>
                                                            <?php endif;?>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">注册时间：</label>
                                                            <div class="col-md-8 text-val"><?php echo dateFormat($info['addtime']);?></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--end col-md-8-->
                    </div>
                    <!--end row-->
                    <div class="tabbable tabbable-custom tabbable-custom-profile">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#tab_1_1" data-toggle="tab"> 店铺配置 </a></li>
                            <li><a href="#tab_1_2" data-toggle="tab"> 订单列表 </a></li>
                            <li><a href="#tab_1_3" data-toggle="tab"> 售后列表 </a></li>
                            <li><a href="#tab_1_4" data-toggle="tab"> 评价列表 </a></li>
                            <li><a href="#tab_1_5" data-toggle="tab"> 商品列表 </a></li>
                            <li><a href="#tab_1_6" data-toggle="tab"> 商品分类 </a></li>
                            <li><a href="#tab_1_7" data-toggle="tab"> 资金明细 </a></li>
                            <li><a href="#tab_1_8" data-toggle="tab"> 红包投放 </a></li>
                            <li><a href="#tab_1_9" data-toggle="tab"> 代金劵投放 </a></li>
                            <li><a href="#tab_1_10" data-toggle="tab"> 满减规则 </a></li>
                            <li><a href="#tab_1_11" data-toggle="tab"> 广告投放 </a></li>
                            <li><a href="#tab_1_12" data-toggle="tab"> 银行卡(支付宝) </a></li>
                            <li><a href="#tab_1_13" data-toggle="tab">监管信息</a></li>
                            <?php if (!empty($shopInfo)):?>
                                <li><a href="#tab_1_14" data-toggle="tab">认证信息</a></li>
                            <?php endif;?>
                        </ul>
                        <div class="tab-content">
                            <!--店铺信息-->
                            <div class="active tab-pane" id="tab_1_1">
                                <div class="row ">
                                    <div class="col-md-12">
                                        <!-- BEGIN VALIDATION STATES-->
                                        <div class="portlet box">
                                            <div class="portlet-body form">
                                                <form action="<?php echo getUrl('merchant/saveStore')?>" class="form-horizontal" method="post" id="main-form2" novalidate="novalidate">
                                                    <div class="form-body">
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">店铺名称<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required"  name="shop_name" type="text" value="<?php echo isset($info['shop_name']) ? $info['shop_name'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">店铺电话<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required"  name="store_tel" type="text" value="<?php echo isset($info['store_tel']) ? $info['store_tel'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">起送金额<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number"  name="min_consume" type="text" value="<?php echo isset($info['min_consume']) ? $info['min_consume'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">周营业日<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <select class="form-control sel required" multiple name="week[]" data-placeholder="请选择">
                                                                    <?php foreach ($week as $k=>$v): ?>
                                                                        <?php  if(isset($info['business_week']) && in_array($k,$info['business_week'])): ?>
                                                                            <option value="<?php echo $k?>" selected ><?php echo $v?></option>
                                                                        <?php else: ?>
                                                                            <option value="<?php echo $k?>" ><?php echo $v?></option>
                                                                        <?php endif;?>
                                                                    <?php endforeach;?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <script type="text/javascript">
                                                            $(function () {
                                                                $(".sel").select2();
                                                            });
                                                        </script>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">日营业时<span class="required">*</span></label>
                                                            <div class="col-md-2">
                                                                <!--                                                                <div class="input-group input-large date-picker input-daterange" data-date="10/11/2012" data-date-format="mm/dd/yyyy">-->
                                                                <!--                                                                    <input class="form-control required" name="business_time_start" type="time"  value="--><?php //echo isset($info['business_time_start']) ? $info['business_time_start'] : '';?><!--" >-->
                                                                <!--                                                                    <span class="input-group-addon">-->
                                                                <!--                                                                         to-->
                                                                <!--                                                                    </span>-->
                                                                <!--                                                                    <input class="form-control required" name="business_time_end" type="time"  value="--><?php //echo isset($info['business_time_end']) ? $info['business_time_end'] : '';?><!--">-->

                                                                <!--                                                                </div>-->
                                                                <input type="text" class="form-control timepicker timepicker-24" name="business_time_start" value="<?php echo isset($info['business_time_start']) ? $info['business_time_start'] : '08:00';?>">
                                                                <span class="help-block msg">填写示例:08:00-21:00</span>
                                                            </div>
                                                            <div class="col-md-2">
                                                                <input type="text" class="form-control timepicker timepicker-24" name="business_time_end" value="<?php echo isset($info['business_time_end']) ? $info['business_time_end'] : '21:00';?>">
                                                            </div>

                                                            <script type="text/javascript">
                                                                $(function () {
                                                                    $('.timepicker-24').timepicker({
                                                                        autoclose: true,
                                                                        minuteStep: 3,
                                                                        showSeconds: false,
                                                                        showMeridian: false
                                                                    });

//                                                                    $("[name='business_time_end']").live('change',function () {
//                                                                        var str = $("[name='business_time_start']").val();
//                                                                        var end = $(this).val();
//                                                                        var reg=/:/g;
//                                                                        var strRe = str.replace(reg,'');
//                                                                        var endRe = end.replace(reg,'');
//                                                                        if (endRe.length < strRe.length){
//                                                                            $("[name='business_time_start']").val(end);
//                                                                        }
//                                                                        if (endRe.length == strRe.length && strRe > endRe){
//                                                                            $("[name='business_time_start']").val(end);
//                                                                        }
//                                                                    });
                                                                })
                                                            </script>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">首单减免金额<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required"  name="first_order_reduce" type="text" value="<?php echo isset($info['first_order_reduce']) ? $info['first_order_reduce'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">平台比例（百分比）<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number"  name="percent" type="text" value="<?php echo isset($info['percent']) ? $info['percent'] : 0;?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">是否启用代金券<span class="required">*</span></label>
                                                            <div class="col-md-9" style="margin-left: 18px;">
                                                                <div class="radio-list">
                                                                    <label class="radio-inline"><input name="able_cash_coupon" <?php if( $info['able_cash_coupon'] == 1):?> checked<?php endif;?>  value="1" type="radio" > 禁用 </label>
                                                                    <label class="radio-inline" style="padding-left: 20px"><input name="able_cash_coupon" <?php if( $info['able_cash_coupon'] == 2):?> checked<?php endif;?>  value="2" type="radio"> 启用 </label>

                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">是否支持使用红包<span class="required">*</span></label>
                                                            <div class="col-md-9" style="margin-left: 18px;">
                                                                <div class="radio-list">
                                                                    <label class="radio-inline"><input name="able_use_coupon" <?php if( $info['able_use_coupon'] == 1):?> checked<?php endif;?>  value="1" type="radio" > 禁用 </label>
                                                                    <label class="radio-inline" style="padding-left: 20px"><input name="able_use_coupon" <?php if( $info['able_use_coupon'] == 2):?> checked<?php endif;?>  value="2" type="radio"> 启用 </label>

                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">营业状态<span class="required">*</span></label>
                                                            <div class="col-md-9" style="margin-left: 18px;">
                                                                <div class="radio-list">
                                                                    <label class="radio-inline"><input name="business" <?php if( $info['business'] == 1):?> checked<?php endif;?>  value="1" type="radio" > 休息 </label>
                                                                    <label class="radio-inline" style="padding-left: 20px"><input name="business" <?php if( $info['business'] == 2):?> checked<?php endif;?>  value="2" type="radio"> 营业 </label>

                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="form-actionsc fluid">
                                                            <div class="col-md-offset-2 col-md-9" style="padding-left: 0;">
                                                                <input type="hidden" name="merchant_id" value="<?php echo get('id')?>">
                                                                <button class="btn green"><i class="fa fa-save"></i> 保存</button>
                                                                <a class="btn default seach-btn" href="<?php echo getUrl('merchant');?>"><i class="fa fa-chevron-left"></i> 返回</a>
                                                            </div>
                                                        </div>

                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--商品列表-->
                            <div class="tab-pane" id="tab_1_5">
                                <div class="table-actions-wrapper">
                                    <a class="btn btn-sm blue" href="<?php echo getUrl('merchant/productForm?merchant_id='.$info['id'])?>"><i class="fa fa-plus"></i> 新增</a>
                                </div>
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_product">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th width="70px"> 图标 </th>
                                                <th> 商品名称 </th>
                                                <th width="100px" sort="false">分类名称</th>
                                                <th width="100px" sort="false">库存类型</th>
                                                <th width="130px" sort="false">价格/市场价</th>
                                                <th width="60px" sort="false">销量</th>
                                                <th width="60px" sort="false">库存</th>
                                                <th width="150px" sort="false">创建时间</th>
                                                <th width="100px" sort="false">状态</th>
                                                <th width="150px" sort="false">操作</th>
                                            </tr>
                                            <tr>
                                                <th></th>
                                                <th><input class="form-control form-filter input-sm" name="name" type="text"></th>
                                                <th>
                                                    <select name="custom_category_id" class="form-control form-filter input-sm">
                                                        <option value="0" selected="selected">所有</option>
                                                        <?php foreach ($custom as $ck =>$cv):?>
                                                            <option value="<?php echo $cv['id']?>"><?php echo $cv['cat_name']?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <select name="is_limited" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <option value="2">无限</option>
                                                        <option value="1">有限</option>
                                                    </select>
                                                </th>
                                                <th>
                                                    <input class="form-control form-filter input-sm" name="goods_price" type="text"/>
                                                    <input class="form-control form-filter input-sm" name="market_price" type="text"/>
                                                </th>
                                                <th></th>
                                                <th></th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="pro_send_date_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="pro_send_date_to" dp placeholder="到" type="text">
                                                </th>
                                                <th>
                                                    <select name="pro_status" class="form-control form-filter input-sm">
                                                        <option value="-1" selected="selected">所有</option>
                                                        <?php foreach ($proStatus as $k =>$v):?>
                                                            <option value="<?php echo $k?>"><?php echo $v?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--订单列表-->
                            <div class="tab-pane" id="tab_1_2">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <div class="table-actions-wrapper"> <span> </span></div>
                                        <table class="table table-bordered table-hover" id="datatable_order">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th>编号</th>
                                                <th> 会员名称</th>
                                                <th>消费模式</th>
                                                <th>订单金额</th>
                                                <th>实付金额</th>
                                                <th>支付方式</th>
                                                <th>下单时间 </th>
                                                <th>状态</th>
                                                <th width="100px">操作</th>
                                            </tr>
                                            <tr>
                                                <th><input class="form-control form-filter input-sm" name="orderCode" type="text"></th>
                                                <th>
                                                    <input class="form-control form-filter input-sm" name="consumer" placeholder="" type="text">
                                                </th>
                                                <th>
                                                    <select name="expenseType" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php foreach ($expenseType as $k => $v):?>
                                                            <option value="<?php echo $k;?>"><?php echo $v;?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="amount_from" placeholder="大于等于" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="amount_to" placeholder="小于等于" type="text" ></th>
                                                </th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="reality_amount_from" placeholder="大于等于" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="reality_amount_to" placeholder="小于等于" type="text" ></th>
                                                </th>
                                                <th>
                                                    <select name="payType" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php foreach ($payType as $k => $v):?>
                                                            <option value="<?php echo $k;?>"><?php echo $v;?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="add_time_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="add_time_to" dp placeholder="到" type="text" ></th>
                                                </th>
                                                <th>
                                                    <select name="orderStatus" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php foreach ($status as $k => $v):?>
                                                            <option value="<?php echo $k;?>"><?php echo $v;?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--售后列表-->
                            <div class="tab-pane" id="tab_1_3">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_service">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th>订单号</th>
                                                <th>所属单号</th>
                                                <th>退款商品</th>
                                                <th>退款原因</th>
                                                <th>退款金额</th>
                                                <th>申请时间</th>
                                                <th>状态</th>
                                                <th width="100px">操作</th>
                                            </tr>
                                            <tr>
                                                <th><input class="form-control form-filter input-sm" name="serviceCode" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="orCode" placeholder="" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="productName" placeholder="" type="text"></th>
                                                <th></th>
                                                <th></th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="service_add_time_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="service_add_time_to" dp placeholder="到" type="text" ></th>
                                                </th>
                                                <th>
                                                    <select name="serviceType" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php foreach ($serviceType as $k => $v):?>
                                                            <option value="<?php echo $k;?>"><?php echo $v;?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--评价列表-->
                            <div class="tab-pane" id="tab_1_4">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th> 产品名称</th>
                                                <th> 评论内容</th>
                                                <th width="150"> 评分</th>
                                                <th width="100"> 评论人</th>
                                                <th width="150"> 商家回复</th>
                                                <th width="150"> 平台回复</th>
                                                <th width="150"> 评论时间 </th>
                                                <th width="155"> 操作 </th>
                                            </tr>
                                            <tr>
                                                <th></th>
                                                <th></th>
                                                <th><input class="form-control form-filter input-sm" name="score" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="c_name" type="text"></th>
                                                <th></th>
                                                <th></th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="send_date_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="send_date_to" dp placeholder="到" type="text">
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--商品分类-->
                            <div class="tab-pane" id="tab_1_6">
                                <div class="table-actions-wrapper">
                                    <a class="btn btn-sm blue category-add" href="javascript:"><i class="fa fa-plus"></i> 新增</a>
                                </div>
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_category">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th> ID</th>
                                                <th> 一级分类</th>
                                                <th>二级分类</th>
                                                <th>分类名称</th>
                                                <th>状态</th>
                                                <th width="210px">添加时间</th>
                                                <th width="180px">操作</th>
                                            </tr>
                                            <tr>
                                                <th></th>
                                                <th><input class="form-control form-filter input-sm" name="parent_name" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="category_name" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="cat_name" type="text"></th>
                                                <th>
                                                    <select name="cat_status" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <option value="1" >禁用</option>
                                                        <option value="2" >启用</option>
                                                    </select>
                                                </th>
                                                <th>
                                                    <input class="form-control form-filter input-sm" name="cat_send_date_from" dp placeholder="从" type="text" style="float: left;width: 50%">
                                                    <input class="form-control form-filter input-sm" name="cat_send_date_to" dp placeholder="到" type="text" style="float: left;width: 50%">
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--资金明细明细-->
                            <div class="tab-pane" id="tab_1_7">
                                <div class="table-actions-wrapper " style="float: right">
                                    <a class="btn btn-sm blue add-found-btn" href="javascript:;" merchant_id = "<?php echo get('id')?>"><i class="fa fa-plus"></i> 资金调节</a>
                                </div>
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_found">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th> 类型</th>
                                                <th width="200px">金额</th>
                                                <th width="200px">状态</th>
                                                <th width="150px">时间</th>
                                                <th width="100px">操作</th>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <select name="found_type" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php  foreach ($found_type as $k=>$item):?>
                                                            <option value="<?php echo $k;?>" ><?php echo $item;?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th></th>
                                                <th>
                                                    <select name="found_status" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php  foreach ($found_status as $k=>$item):?>
                                                            <option value="<?php echo $k;?>" ><?php echo $item;?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="addtime_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="addtime_to" dp placeholder="到" type="text">
                                                </th>
                                                <th> <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default">
                                                            <i class="fa fa-search"></i> 搜索
                                                        </a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li>
                                                                <a href="javascript:void(0);" class="filter-cancel">重置</a>
                                                            </li>
                                                        </ul>
                                                    </div></th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--红包投放-->
                            <div class="tab-pane" id="tab_1_8">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_bonus">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th width="50px"> 广告</th>
                                                <th > 投放周期</th>
                                                <th width="150px"> 投放金额</th>
                                                <th width="150px"> 投放个数</th>
                                                <th width="150px"> 领取情况</th>
                                                <th width="150px"> 状态</th>
                                                <th width="150px"> 操作</th>
                                            </tr>
                                            <tr>
                                                <th></th>
                                                <th></th>
                                                <th></th>
                                                <th></th>
                                                <th></th>
                                                <th>
                                                    <select name="bonus_status" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <option value="1">未开始</option>
                                                        <option value="2">已结束</option>
                                                        <option value="3">进行中</option>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--代金劵投放-->
                            <div class="tab-pane" id="tab_1_9">
                                <div class="row ">
                                    <div class="col-md-12">
                                        <!-- BEGIN VALIDATION STATES-->
                                        <div class="portlet box">
                                            <div class="portlet-body form">
                                                <form action="<?php echo getUrl('merchant/saveCoupon');?>" class="form-horizontal" id="coupon-form" method="post">
                                                    <div class="modal-body">
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">优惠面额（元）<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number" name="money" type="text" value="<?php echo isset($cashInfo['money']) ? $cashInfo['money'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">有效时间（小时）<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number"  name="valid_hour" type="text" value="<?php echo isset($cashInfo['valid_hour']) ? $cashInfo['valid_hour'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">获得条件<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number"  name="receive" type="text" value="<?php echo isset($cashInfo['receive']) ? $cashInfo['receive'] : '';?>" >
                                                                <span class="help-block">订单满 xx 元</span>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">使用条件<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number"  name="condition" type="text" value="<?php echo isset($cashInfo['condition']) ? $cashInfo['condition'] : '';?>" >
                                                                <span class="help-block">订单满 xx 元</span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-actionsc fluid">
                                                        <div class="col-md-offset-2 col-md-9" style="padding-left: 0;">
                                                            <input type="hidden" name="merchant_id" value="<?php echo get('id')?>">
                                                            <button class="btn green"><i class="fa fa-save"></i> 保存</button>
                                                            <a class="btn default seach-btn" href="<?php echo getUrl('member/merchant');?>"><i class="fa fa-chevron-left"></i> 返回</a>
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--满减规则-->
                            <div class="tab-pane" id="tab_1_10">
                                <div class="row ">
                                    <div class="col-md-12">
                                        <!-- BEGIN VALIDATION STATES-->
                                        <div class="portlet box">
                                            <div class="portlet-body form">
                                                <form action="<?php echo getUrl('merchant/saveFull');?>" class="form-horizontal" id="full-form" method="post">
                                                    <div class="modal-body">
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">起始时间<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number" name="start_time" dp type="text" value="<?php echo isset($fullInfo['start_time']) ? $fullInfo['start_time'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label class="control-label col-md-2">结束时间<span class="required">*</span></label>
                                                            <div class="col-md-4">
                                                                <input class="form-control required number"  name="end_time" dp type="text" value="<?php echo isset($fullInfo['end_time']) ? $fullInfo['end_time'] : '';?>" >
                                                            </div>
                                                        </div>
                                                        <?php for($i = 0; $i < 3; $i ++):?>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-2">
                                                                    满减规则 <?php if ($i == 0){ echo '一'; }else if($i == 1){ echo '二'; }else{ echo '三'; }?>
                                                                    <span class="required">*</span></label>
                                                                <div class="col-md-2">
                                                                    <input type="text" class="form-control" name="rule[<?php echo $i?>][max_money]" value="<?php echo isset($fullInfo['rule'][$i]['max_money']) ? $fullInfo['rule'][$i]['max_money'] : '';?>">
                                                                    <span class="help-block">满 xx 减 xx 元</span>
                                                                </div>
                                                                <div class="col-md-2">
                                                                    <input type="text" class="form-control" name="rule[<?php echo $i?>][money]" value="<?php echo isset($fullInfo['rule'][$i]['money']) ? $fullInfo['rule'][$i]['money'] : '';?>">
                                                                </div>
                                                            </div>
                                                        <?php endfor;?>
                                                    </div>
                                                    <div class="form-actionsc fluid">
                                                        <div class="col-md-offset-2 col-md-9" style="padding-left: 0;">
                                                            <input type="hidden" name="merchant_id" value="<?php echo get('id')?>">
                                                            <button class="btn green"><i class="fa fa-save"></i> 保存</button>
                                                            <a class="btn default seach-btn" href="<?php echo getUrl('member/merchant');?>"><i class="fa fa-chevron-left"></i> 返回</a>

                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!--广告投放-->
                            <div class="tab-pane" id="tab_1_11">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_ads">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th> 广告位 </th>
                                                <th> 周期（天） </th>
                                                <th sort="false">申请时间</th>
                                                <th width="150px" sort="false">状态</th>
                                                <th width="150px" sort="false">操作</th>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <select name="ad_position" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php foreach ($position as $posk => $posv):?>
                                                            <option value="<?php echo $posk?>"><?php echo $posv?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th></th>
                                                <th>
                                                    <div class="margin-bottom-5">
                                                        <input class="form-control form-filter input-sm" name="ads_send_date_from" dp placeholder="从" type="text">
                                                    </div>
                                                    <input class="form-control form-filter input-sm" name="ads_send_date_to" dp placeholder="到" type="text">
                                                </th>
                                                <th>
                                                    <select name="ads_status" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <?php foreach ($adsStatus as $adsk => $adsv):?>
                                                            <option value="<?php echo $adsk?>"><?php echo $adsv?></option>
                                                        <?php endforeach;?>
                                                    </select>
                                                </th>
                                                <th>
                                                    <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default"><i class="fa fa-search"></i> 搜索</a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li><a href="javascript:void(0);" class="filter-cancel">重置</a></li>
                                                        </ul>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody></tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--银行卡支付宝-->
                            <div class="tab-pane" id="tab_1_12">
                                <div class="table-responsive">
                                    <div class="table-container">
                                        <table class="table table-bordered table-hover" id="datatable_account">
                                            <thead>
                                            <tr role="row" class="heading">
                                                <th width="100px"> 类型</th>
                                                <th width="200px"> 开户名(支付宝用户名)</th>
                                                <th>银行卡号(支付宝账号)</th>
                                                <th width="200px">开户行( 支付宝)</th>
                                                <th width="150px">联系电话</th>
                                                <th width="100px">操作</th>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <select name="bank_type" class="form-control form-filter input-sm">
                                                        <option value="" selected="selected">所有</option>
                                                        <option value="1">银行卡</option>
                                                        <option value="2">支付宝</option>
                                                    </select>
                                                </th>
                                                <th><input class="form-control form-filter input-sm" name="account_name" type="text"></th>
                                                <th><input class="form-control form-filter input-sm" name="account_number" type="text"></th>
                                                <th></th>
                                                <th><input class="form-control form-filter input-sm" name="mobile" type="text"></th>
                                                <th> <div class="btn-group">
                                                        <a class="btn btn-xs filter-submit btn-default">
                                                            <i class="fa fa-search"></i> 搜索
                                                        </a>
                                                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle btn-xs" type="button"><i class="fa fa-angle-down"></i></button>
                                                        <ul role="menu" class="dropdown-menu pull-right">
                                                            <li>
                                                                <a href="javascript:void(0);" class="filter-cancel">重置</a>
                                                            </li>
                                                        </ul>
                                                    </div></th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>

                            <!--监管部门-->
                            <div class="tab-pane" id="tab_1_13">
                                <div class="portlet-body">
                                    <div class="form-horizontal" >
                                        <div class="form-body supervise-box"></div>
                                    </div>
                                </div>
                                <script type="text/javascript">
                                    getDistrictList();
                                    function getDistrictList() {
                                        l_blockUI();
                                        var id = '<?php echo $info["id"]?>';
                                        var commonUrl = '<?php echo getUrl('merchant/getSuperviseList')?>?id='+id;
                                        var butEdit = "<?php echo adminAuthority('home-edit', 'question')?>";
                                        $.ajax(commonUrl, {
                                            dataType: 'json',
                                            type: 'post',
                                            data: {id: id},
                                            error: function () {
                                                show_message({status: 0, message: '请求超时'});
                                                App.unblockUI();
                                            },
                                            timeout: 60000,
                                            success: function (data, textStatus, jqXHR) {
                                                if (data.message) {
                                                    show_message(data);
                                                }

                                                var html = '';
                                                if (!data.length) {
                                                    html = '<div class="well item-box" style="height:200px;text-align:center;padding-top:100px;">没有相关信息！' +
                                                        '<a class="btn blue supervise-add" href="javascript:"><i class="fa fa-plus"></i> 新增 </a></div>';
                                                }
                                                $.each(data, function (k, v) {
                                                    if (k == 0) {
                                                        html += '<a class="btn blue supervise-add" href="javascript:" style="float: right;"><i class="fa fa-plus"></i> 新增 </a>';
                                                    }
                                                    html += '<div class="form-group"><h3 class="form-section">' + v.supervise+ ' - ' + v.supervise_department+
                                                        '<a href="javascript:;" class="btn btn-xs blue-stripe default edit-supervise" data-id="'+k+'"> 编辑</a>' +
                                                        '<a href="<?php echo getUrl('merchant/deleteSupervise')?>?id='+k+'&merchant_id='+id+
                                                        '" class="btn btn-xs red-stripe default ajax-request-btn" alert-message="确认要删除'+v.supervise+'信息？" > 删除</a>';
                                                    html += '</h3>';
                                                    html += '<div class="col-md-2"><div class="form-group">';
                                                    html += '<label class="control-label col-md-3">（男）:</label>';
                                                    html += '<div class="col-md-9 sup-portrait"><img src="'+v.supervise_man_portrait+'"/>';
                                                    html += '</div></div></div>';
                                                    html += '<div class="col-md-2"><div class="form-group">';
                                                    html += '<label class="control-label col-md-3">（女）:</label>';
                                                    html += '<div class="col-md-9 sup-portrait"><img src="'+v.supervise_woman_portrait+'"/>';
                                                    html += '</div></div></div>';
                                                    html += '<div class="row col-md-8">';
                                                    html += '<div class="col-md-6"><div class="form-group">';
                                                    html += '<label class="control-label col-md-4">监管人:</label>';
                                                    html += '<div class="col-md-8"><p class="form-control-static">' + v.supervise_name + '</p>';
                                                    html += '</div></div></div>';
                                                    html += '<div class="col-md-6"><div class="form-group">';
                                                    html += '<label class="control-label col-md-4">监管电话:</label>';
                                                    html += '<div class="col-md-8"><p class="form-control-static">' + v.supervise_tel + '</p>';
                                                    html += '</div></div></div>';
                                                    html += '</div>';
                                                    html += '</div>';
                                                });
                                                $('.supervise-box').html(html);
                                                App.unblockUI();
                                            }
                                        });
                                    }
                                </script>
                            </div>

                            <?php if (!empty($shopInfo)):?>
                                <!--认证信息-->
                                <div class="tab-pane" id="tab_1_14">
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">店铺名称：</label>
                                            <div class="col-md-8 text-val nickname"><?php echo $shopInfo['shop_name'];?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">消费类型：</label>
                                            <div class="col-md-8 text-val"><?php echo $shopInfo['shop_type_name'];?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">区域：</label>
                                            <div class="col-md-8 text-val balance"><?php echo $shopInfo['province_name'].$shopInfo['city_name'].$shopInfo['county_name'];?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">店铺地址：</label>
                                            <div class="col-md-8 text-val"><?php echo $shopInfo['address'].$shopInfo['street'];?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">身份证名称：</label>
                                            <div class="col-md-8 text-val"><?php echo $shopInfo['id_name']?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">身份证号码：</label>
                                            <div class="col-md-8 text-val"><?php echo $shopInfo['identification'];?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">认证状态：</label>
                                            <div class="col-md-8 text-val"><?php echo $shopInfo['status_name'];?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">认证时间：</label>
                                            <div class="col-md-8 text-val"><?php echo dateFormat($shopInfo['addtime']);?></div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="col-md-4 control-label text-label">营业执照：</label>
                                            <div class="col-md-8 text-val" style="height: 200px;">
                                                <img src="<?php echo $shopInfo['license']['og'];?>" style="max-width: 100%;max-height: 100%;"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <?php endif;?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php get_instance()->view('merchant/found_form');?>
<?php get_instance()->view('merchant/bonus_form');?>
<?php get_instance()->view('merchant/category_form');?>
<?php get_instance()->view('merchant/supervise_form');?>
<?php get_instance()->view('config/ads_refuse_form.php');?>

<?php get_instance()->view('product/comment/img_form.php'); // 查看评价图片?>
<?php get_instance()->view('product/comment/reply_form.php'); // 评价回复?>

<script type="text/javascript">
    var id = <?php echo $info['id'];?>;
    $(function(){
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_account"),
            sAjaxSource: "<?php echo getUrl('merchant/bankCardList?merchant_id=');?>"+id,
            bSort:false
        });

        // 订单列表
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_order"),
            sAjaxSource: "<?php echo getUrl('merchant/orderList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,2,5,7,8]
            }]
        });

        // 订单售后
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_service"),
            sAjaxSource: "<?php echo getUrl('merchant/serviceList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,2,3,6,7]
            }]
        });

        // 评价列表
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable"),
            sAjaxSource: "<?php echo getUrl('merchant/getCommentList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,3,4,5,7]
            }]
        });

        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_found"),
            sAjaxSource: "<?php echo getUrl('merchant/FoundLogList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,2,4]
            }]
        });

        // 红包投放
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_bonus"),
            sAjaxSource: "<?php echo getUrl('merchant/bonusList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,5,6]
            }]
        });

        //代金券投放
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_cash_coupon"),
            sAjaxSource: "<?php echo getUrl('merchant/getCashCouponList?id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [5]
            }]
        });

        //商品分类
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_category"),
            sAjaxSource: "<?php echo getUrl('merchant/getCategoryList?id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,2,3,4,6]
            }]
        });

        //商品列表
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_product"),
            sAjaxSource: "<?php echo getUrl('merchant/getProductList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,2,3,4,8,9]
            }]
        });

        //店铺推广
        datatable_init({
            "sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
            src: $("#datatable_ads"),
            sAjaxSource: "<?php echo getUrl('merchant/getAdsList?merchant_id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,3,4]
            }]
        });

        $('[dp]').not("[noinit]").datepicker({
            changeMonth: true,
            autoclose: true,
            format: "yyyy-mm-dd",
            language: 'zh-CN'
        });
        $.e_validate.init('#main-form', {});
        $.e_validate.init('#main-form2', {});
        $.e_validate.init('#coupon-form', {});
        $.e_validate.init('#full-form', {});

        $('.content').live('mouseover',function(){
            $(this).height('75px');
        });

        $('.content').live('mouseout',function(){
            $(this).height('26px');
        });
    });

    //异步调用
    function ajaxRequestCallBack(e){
        if(e.data == 'product'){
            $('#datatable_product').dataTable().fnDraw(true); // 商品列表上下架
        }else if(e.data == 'bonus'){
            $('#datatable_bonus').dataTable().fnDraw(true); // 红包
        }else if(e.data == 'supervise'){
            getDistrictList();   //监管信息
        }else if(e.data.data == 'upgrade'){
            // 商家升级
            $(".rank_name").html(e.data.rank_name);
            if(e.data.rank >= 3){
                $(".rank").remove();
            }
        }else if(e.data == 'order'){
            $("#datatable_order").dataTable().fnDraw(); // 订单列表
        }else{
            $('#datatable_category').dataTable().fnDraw();  // 商品分类
        }
    }
</script>
</body>
</html>